package com.norma.macaron.service.common.domain.auth;

import com.norma.macaron.service.common.domain.user.TMenu;
import com.norma.macaron.service.common.domain.user.TRole;
import com.norma.macaron.service.common.domain.user.TUser;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;
import java.util.Map;


/***
 * @Author zhangchaofeng
 * @Description //用户扩展类
 * @Date 14:21 2020/6/8 0008
 **/
@ToString
@Getter
@Setter
public class UserExt extends TUser implements Serializable {

    private static final long serialVersionUID = 7744727578539129135L;

    /**
     * 角色信息
     */
    private List<TRole> roles;

    /**
     * 权限信息
     */
    private List<TMenu> permissions;

    public UserExt() {
        super();
    }

    public UserExt(TUser user, List<TRole> roles, List<TMenu> permissions) {
        super(user.getPhone(),user.getPassword());
        this.permissions = permissions;
        this.roles = roles;
    }

}
